From d05ae13188231e3bc3673e0796d8b063b1d59cff Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 26 May 2009 10:01:54 +0100 Subject: [PATCH] blkif: Clarify units for 'sector'-sized blkif request params. Signed-off-by: Stefano Stabellini --- xen/include/public/io/blkif.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xen/include/public/io/blkif.h b/xen/include/public/io/blkif.h index 2380066b8c..3e0c5abae3 100644 --- a/xen/include/public/io/blkif.h +++ b/xen/include/public/io/blkif.h @@ -84,6 +84,13 @@ */ #define BLKIF_MAX_SEGMENTS_PER_REQUEST 11 +/* + * NB. first_sect and last_sect in blkif_request_segment, as well as + * sector_number in blkif_request, are always expressed in 512-byte units. + * However they must be properly aligned to the real sector size of the + * physical disk, which is reported in the "sector-size" node in the backend + * xenbus info. Also the xenbus "sectors" node is expressed in 512-byte units. + */ struct blkif_request_segment { grant_ref_t gref; /* reference to I/O buffer frame */ /* @first_sect: first sector in frame to transfer (inclusive). */ -- 2.30.2